package com.zhu;

import com.spring.ZhuApplicationContext;
import com.zhu.service.UserInterface;
import com.zhu.service.UserService;

public class Test {
    public static void main(String[] args) {
        //创建单例bean
        ZhuApplicationContext applicationContext=new ZhuApplicationContext(AppConfig.class);
        //使用jdk实现aop必须使用接口
        UserInterface userService= (UserInterface) applicationContext.getBean("userService");
//        System.out.println(applicationContext.getBean("userService"));
//        System.out.println(applicationContext.getBean("userService"));
//        System.out.println(applicationContext.getBean("userService"));
        userService.test();
    }
}
